[3.0] Apply MaybeBool transformation to fields/properties#2574
Merged
Conversation
…for simplicity The performance difference is negligible.
Not actually sure if this is ever going to be used, but I guess it will at least be consistent in behavior with BoolTransformer
Contributor
|
Minimum allowed coverage is Generated by 🐒 cobertura-action against 783e662 |
Exanite
commented
May 18, 2026
Exanite
left a comment
Member
Author
There was a problem hiding this comment.
Self review completed. Note that OpenAL/GL don't really have structs so no bindings changes there.
Exanite
commented
May 18, 2026
This was used by the syntax-based renamer (extremely old at this point)
Exanite
commented
May 20, 2026
curin
approved these changes
Jun 3, 2026
Exanite
added a commit
that referenced
this pull request
Jun 7, 2026
Exanite
added a commit
that referenced
this pull request
Jun 12, 2026
* Add WIP documentation for using the Silk 3 generator * Add for-contributors/Generator folder * Work on an outline for two new generator docs pages * Work on high-level overview section * Edit the overview section and begin writing about PrettifyNames * Work on PrettifyNames section * Omit the name processor parameters since they don't provide much additional info * Edit wording * Work on Name Splitting and Name Prettification sections * Revise the name processing docs * More editing * Write the Acronym Indeterminate Inputs section * Finish writing the Name Prettification section * Work on name affixes section * Add PrettifyNames - Notable Decisions section * Write the Referenced Affixes section * Add Name Affixes - Metadata Format section * Add Referenced Affixes - Metadata Format section * Remove completed todo * Add test cases to cover ID3D12Device shared prefix identification behavior * Write the Symbol-based Renamer section * Edit name processing docs * Reflow the text * Add note on where the referenced affix example comes from * Add example where only one of the two consecutive acronyms is preserved * Begin working on generator mods docs * Write the Mod Configuration section * Add empty sections for each mod * Clarify what information will go in the Available Mods section * List out the name affix categories and work on outlining the rest of the docs * Add information about usage recommendations section * Work on docs and write the AddApiProfiles section * Work on docs and attempt to write AddVTables usage recommendation * Remove the WIP usage recommendations for AddVTables since I don't know enough to explain it * Work on mods docs * Add light docs for ClangScraper mod * Add docs for ExtractHandles and add ExtractHandlesTests matching the example given in the docs * Document that the example has a matching test case * Change ModUtils.RelativePath() to work when no project path is available This is because project path is null during unit tests and I can't figure out if it is possible to set the project path of an AdhocWorkspace project. * Add TestUtils.VerifyDocumentsAsync * Use Single instead of First since we expect one matching doc * Work on ExtractNestedTyping docs and add SuccessfullyExtractsNestedInlineArray test case * Work on docs and add SuccessfullyExtractsFunctionPointer test case * Add SuccessfullyExtractsCStyleEnumConstants test case * Add passing SuccessfullyExtractsCStyleEnumConstants_Pointer and failing SuccessfullyExtractsCStyleEnumConstants_ReturnType test case * Add SuccessfullyExtractsCStyleEnumConstants_Field test case * Rename snapshot to match renamed test * Write the IdentifySharedPrefixes section * Add note about IdentifySharedPrefixes's history * Fix incorrect test document name * Add more information to the IdentifySharedPrefixes section * Fix and edit wording * Add InterceptNativeFunctionsTests * Write the InterceptNativeFunctions section * Work on docs for MarkNativeNames * Work on MixKhronosData docs * Work on documenting the name affixes used by MixKhronosData * Write docs for KhronosNonExclusiveVendor * Finish writing the name affix docs for MixKhronosData * Finish up the MixKhronosData section * Write the PrettifyNames section * Write the StripAttributes section * Write the TransformEnums section and add note about ClangScraper platform differences * Edit wording * Attempt to write some docs for TransformFunctions * Work on TransformHandles docs * Write docs for TransformProperties and finish the first pass of the generator mod docs Probably not going to too much of a second pass since I'm tired of writing docs and the idea is that these docs will improve over time. Going from no docs to almost everything documented is already a really good step forward. * Adjust wording * Add OpenAL and Vulkan to changelog * Remove todos relating to PR #2574 * Document ClangScraper platform-specific differences and edit generator mod docs * Add Library-Specific Notes doc * Add link for more information * Add link from ClangScraper section to Library-Specific Notes doc * Fix incorrect title for Static vs Instance Bindings doc * Add link from AddVTables section to Static vs Instance Bindings doc * Prefer referring to native APIs using the term "API" rather than "library" I saw that static-vs-instance-bindings.md used the terms "API" and "native API" to describe the APIs being bound to using SilkTouch. I'm deciding to keep this pattern moving forward for consistency. * Add links to Using the Generator and remap-stdint.rsp to generator-mods.md * Work on Using the Generator docs * Continue editing the Using the Generator docs * Don't surround ClangSharpPInvokeGenerator in backticks * Cleanup section on general eng/silktouch folder structure * Finish editing the Using the Generator docs * Cleanup * Update test cases to use TestUtils.VerifyDocumentsAsync * Cleanup * Edit the intro to the Using the Generator docs * Edit docs and avoid using inline code snippets in headers * Add <see> reference to ClangScraper (cherry picked from commit 3192da8be03dffedae9319636018ee901f959716) * Change ExtractHandlesTests to not filter the verified documents list * Add some spacing to the KhronosNonExclusiveVendor section * Edit Generator Mods docs * Edit MarkNativeNames to clarify who is responsible for adding NativeName attributes * [3.0] Split up ExtractNestedTyping and add tests for TransformHandles (#2587) * Start of generator fixes and polish branch * Add stubs for ExtractEnumConstants and ExtractFunctionPointers * Fix invalid interface implementation * Work on splitting ExtractNestedTyping into 3 separate mods * Continue to move code to their new locations * Further cleanup * Rename ExtractNestedTyping to ExtractNestedTypes This is be more consistent with C#'s terminology now that ExtractNestedTypes strictly only handles NestedTypes and not other forms of "nested typing". * Split ExtractNestedTypes tests into 3 sets of tests and ensure project is compilable (if not correct) This is so I can start testing for expected behavior. * Get ExtractNestedTypes working * Update test snapshot names * Get ExtractFunctionPointers working * Fix subtly incorrect behavior and remove dependency on Mod for ExtractFunctionPointers/NestedTypes * Move GetNativeTypeNameForPredefinedType to ExtractEnumConstants and cleanup * Fix incorrect file name * Prefer IMod over Mod where possible This also means free performance since Mod sneakily creates a compilation and walks through it * Document where ExtractFunctionPointers and ExtractNestedTypes output their extracted files Also add todo for doing the same in ExtractEnumConstants * Get ExtractEnumConstants working * Update config * Add remark comment on ExtractNestedTypes only handling ClangScraper's special structs * Generate on Windows (apparently accidentally fixed a namespace bug) * Remove unused code * Cleanup GetNativeTypeNameForPredefinedType * Use constructor and avoid nullable properties We always allocate these so this is strictly a readability and performance improvement. * Refactor code to use record structs * Work on deciphering tuple usages * Figure out what _numericTypeNames does * Add support for requiredTargetSpecifier to TryParseNativeTypeName * Handle method return types properly and fix SuccessfullyExtractsCStyleEnumConstants_ReturnType * Cleanup todos * Handle fields properly and fix SuccessfullyExtractsCStyleEnumConstants_Field * Generate on Windows * Cleanup * Annotate extracted enums with [NativeName] * Generate on Windows * Add IEquatable to transformed handle types These already implemented all the required members for IEquatable, so I found it weird that they didn't also implement the interface. * Generate on Windows for IEquatable handles change * Add TransformHandlesTests * Reorder code for clarity * Update docs with sections for the 3 mods ExtractNestedTyping was split into * Change Sdl in ExtractEnumConstantsTests to be a class, not a struct This is more representative of the actual bindings even though it doesn't affect the tests. * Fix incorrect variable name and type name
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of the PR
This adds MaybeBool transformation to fields and properties in
TransformProperties, similar to howBoolTransformerforTransformFunctionscurrently works.Related issues, Discord discussions, or proposals
Discord thread: https://discord.com/channels/521092042781229087/1499733234714546286
Further Comments
Tasks: